package com.microservice.consumer.controller;


import com.microservice.consumer.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class FeignController {


    @Autowired
    public FeignService feignService;

    @GetMapping("/trigger/{producer}")
    public String useFeignTrigger(@PathVariable String producer) {
        return feignService.triggerServiceByFeign();
    }
}
